package com.example.webservice.service;

import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.xml.ws.Endpoint;

/**
 * description: CXF 配置
 */
@Configuration
public class CxfConfig {
    @Autowired
    private Bus bus;

    @Autowired
    private KpiWebService kpiWebService;

    /**
     * description: kpiService webService服务
     */
    @Bean
    public Endpoint userInfo() {
        EndpointImpl endpoint = new EndpointImpl(bus, kpiWebService);
        endpoint.publish("/kpi");
        return endpoint;
    }

}
